Skip to content

Conversation

DominicGBauer
Copy link
Contributor

Description

  1. Fix the issue where client IDs were not matching leading to down syncs not being shown on the client app.
  2. Fix updateObjectsFromBuckets always returning true.

Work Done

  • There was an erroneously included ' at the end of clientId when hitting the write-checkpoint endpoint which I have now removed.
  • Moved to writeTransaction in updateLocalTarget function as there is a write occurring in the transaction.
  • Moved to use new delete_pending_buckets operation.
  • updateObjectsFromBuckets now returns the response from
val res = tx.get("select last_insert_rowid()") { cursor ->
    cursor.getLong(0)!!
}

as opposed to the execute

res = tx.execute(
     "INSERT INTO powersync_operations(op, data) VALUES(?, ?)",
      listOf("sync_local", "")
)

which always returned 1 row updated and therefore always resolved to true

Testing

Screen.Recording.2024-10-08.at.5.21.22.PM.mov

@DominicGBauer DominicGBauer self-assigned this Oct 8, 2024
@DominicGBauer DominicGBauer merged commit 55cf059 into main Oct 8, 2024
3 checks passed
@DominicGBauer DominicGBauer deleted the fix/bug-with-client-id branch October 8, 2024 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants